﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace InfiniteRogue.Rules
{
    public class Bounty : IBountySystem
    {
        public void ProcessCombatVictory(Character victor, Character loser, Engine engine)
        {
            victor.Stats[StatSystem.EXP] += 10;
        }

        public int LevelFromExp(int exp)
        {
            return exp / 20 + 1;
        }

        public void LevelUp(Character character)
        {
            character[StatSystem.LVL] += 1;
            character[StatSystem.STATPOINTS] += 5;
            character[StatSystem.SKILLPOINTS] += 10;

            character[StatSystem.HP_MAX] += character[StatSystem.END] / 10;
            character[StatSystem.MP_MAX] += (character[StatSystem.INT] + character[StatSystem.WIS]) / 20;

            character[StatSystem.HP] = character[StatSystem.HP_MAX];
            character[StatSystem.MP] = character[StatSystem.MP_MAX];
        }
    }
}
